﻿using Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UnitTestProject
{
    class Program
    {
        static void Main(string[] args)
        {
            //Test_Design design = new Test_Design();
            //string res = design.FunSingle();
            //Console.Write(res);



            //#region 简单工厂模式
            ////方式一： 通过接口参数实例化对象
            //ICreate c = new PeoPle();
            //CreateFactory factory = new CreateFactory(c);
            //c.Create();

            ////方式二： 通过参数实例化对象
            //ICreate c1 = CreateFactory.GeneratorCreate("people");
            //c1.Create();
            //#endregion

            #region  工程方法模式
            //Console.WriteLine("工厂方法模式...... Begin");
            //CreateFactory createFactory = new PeopleFactory();
            //ICreate icreate = createFactory.CreateObject();
            //icreate.Create();

            //方式二：            
            //ICreate icreate = new People();
            //CreateFactory fac = new CreateFactory(icreate);
            //icreate.Create();

            //Console.WriteLine("工厂方法模式...... End");
            #endregion

            /*
            #region 抽象工厂方法
            Calculator cal = new Calculator();
            cal.Sum();
            #endregion
             * */

            /*
            #region  建造者模式
            BuilderClient builderclient = new BuilderClient();
            builderclient.BuilderTest();
            #endregion
             * */

            
            #region 原型模式
            PrototypeTest pTest = new PrototypeTest();
            pTest.Prototype_Test();
            #endregion
             

            /*
            InterTest test = new InterTest();
            test.Inter_Test();
             **/

            Console.ReadKey();
        }
    }
}
